import config from "@/config"
import http from "@/utils/request"

export default {
	list: {
		url: `${config.API_URL}/merchant/goods/index`,
		name: "获取商品列表",
		get: async function(data={}){
			return await http.get(this.url, data);
		}
	},
    add: {
        url: `${config.API_URL}/merchant/goods/add`,
		name: "添加商品",
		post: async function(data={}){
			return await http.post(this.url, data);
		}
    },
    getAddInfo: {
        url: `${config.API_URL}/merchant/goods/add`,
		name: "获取添加商品信息",
		get: async function(data={}){
			return await http.get(this.url, data);
		}
    },
    edit: {
        url: `${config.API_URL}/merchant/goods/edit`,
		name: "编辑商品",
		post: async function(data={}){
			return await http.post(this.url, data);
		}
    },
	getEditInfo: {
		url: `${config.API_URL}/merchant/goods/edit`,
		name: "获取编辑商品信息",
		get: async function(data={}){
			return await http.get(this.url, data);
		}
	},
    del: {
        url: `${config.API_URL}/merchant/goods/del`,
		name: "删除商品",
		post: async function(data={}){
			return await http.post(this.url, data);
		}
    },
    recover: {
        url: `${config.API_URL}/merchant/goods/recover`,
		name: "恢复商品",
		post: async function(data={}){
			return await http.post(this.url, data);
		}
    },
    shelf: {
        url: `${config.API_URL}/merchant/goods/shelf`,
		name: "上下架商品",
		post: async function(data={}){
			return await http.post(this.url, data);
		}
    },
    card: {
        url: `${config.API_URL}/merchant/goods/card`,
		name: "卡密列表",
		get: async function(data={}){
			return await http.get(this.url, data);
		}
    }
}
